package com.iplant.mes.service.mesenum.andon;

import com.iplant.base.po.enums.BaseEnum;

/**
 * 工位状态（看板）
 *
 * @author YouWang·Peng
 * 2024-1-3 11:19:20
 */
public enum AndonStationStatusTypes implements BaseEnum {
    /**
     * 默认 固定值
     */
    Default(0, "默认", ""),
    /**
     * 空闲
     */
    Idle(1, "空闲", ""),
    /**
     * 待执行
     */
    ToExecute(2, "待执行", ""),
    /**
     * 加工中
     */
    Processing(3, "加工中", ""),
    /**
     * 已完工
     */
    Completed(4, "已完工", ""),
    /**
     * 异常
     */
    Abnormal(5, "异常", "");

    private int value;
    private String label;
    private String remark;

    AndonStationStatusTypes(int value, String label, String remark) {
        this.value = value;
        this.label = label;
        this.remark = remark;
    }

    /**
     * 通过 value 的数值获取枚举实例
     *
     * @param val int
     * @return BCMRuleItemTypes
     */
    public static AndonStationStatusTypes getEnumType(int val) {
        for (AndonStationStatusTypes type : AndonStationStatusTypes.values()) {
            if (type.getValue() == val) {
                return type;
            }
        }
        return Default;
    }

    public int getValue() {
        return value;
    }

    public String getLabel() {
        return label;
    }

    @Override
    public void setValue(int wValue) {
        this.value = wValue;
    }

    @Override
    public void setLabel(String wLabel) {
        this.label = wLabel;
    }

    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }
}
